<template>
	<view>
		<image src="/static/work1.jpg" mode="" class="img_bg"></image>
		<view class="" style="position: absolute; top: 0; width: 100%;">
			<view class="text-left bg-white padding-l30 margin-l20 margin-r20 padding-r30 margin-t30" style="border-radius: 3%;">
				<view class="text-36 text-bold " style="border-bottom: solid #808080 1upx; text-align: center;">{{type==1?'作业活动清单详情':'设备设施清单详情'}}</view>
				<view class="border-bottom display justify-between align-center">
					<view class="text-36 padding-t30 padding-b30">清单名称</view>
					<view class="text-32 font-gray1 padding-r30">{{danger_listMenu.danger_name?danger_listMenu.danger_name:'-'}}</view>
				</view>
				<view class="border-bottom display justify-between align-center">
					<view class="text-36 padding-t30 padding-b30 ">风险等级</view>
					<view class="text-32 font-gray1 padding-r30" :class="danger_listMenu.danger_level=='低风险'?'jiaobiao':danger_listMenu.danger_level=='一般风险'?'jiaobiao1':danger_listMenu.danger_level=='较大风险'?'jiaobiao2':'jiaobiao3'">{{danger_listMenu.danger_level?danger_listMenu.danger_level:'-'}}</view>
				</view>

				<view class="border-bottom display justify-between align-center" v-show="type==1">
					<view class="text-36 padding-t30 padding-b30 ">LEC法:</view>
					<view class="text-32 font-gray1 padding-r10">L:</view>
					<view class="text-32 font-gray1 padding-r30" style="border: solid 1upx #0d98ed;">{{danger_listMenu.activity_ev_l?danger_listMenu.activity_ev_l:'-'}}</view>
					<view class="text-32 font-gray1 padding-r10">E:</view>
					<view class="text-32 font-gray1 padding-r30" style="border: solid 1upx #0d98ed;">{{danger_listMenu.activity_ev_l?danger_listMenu.activity_ev_l:'-'}}</view>
					<view class="text-32 font-gray1 padding-r10">C:</view>
					<view class="text-32 font-gray1 padding-r30" style="border: solid 1upx #0d98ed;">{{danger_listMenu.activity_ev_l?danger_listMenu.activity_ev_l:'-'}}</view>
					<view class="text-32 font-gray1 padding-r10">D:</view>
					<view class="text-32 font-gray1 padding-r30" style="border: solid 1upx #0d98ed;">{{danger_listMenu.activity_ev_l?danger_listMenu.activity_ev_l:'-'}}</view>
				</view>

				<view class="border-bottom display justify-between align-center" v-show="type==2">
					<view class="text-36 padding-t30 padding-b30 ">LSR法:</view>
					<view class="text-32  padding-r10">L:</view>
					<view class="text-32 font-gray1 padding-r30" style="border: solid 1upx #0d98ed; text-align: center;">{{danger_listMenu.activity_ev_l?danger_listMenu.activity_ev_l:'-'}}</view>
					<view class="text-32  padding-r10">S:</view>
					<view class="text-32 font-gray1 padding-r30" style="border: solid 1upx #0d98ed;">{{danger_listMenu.facility_eva_s?danger_listMenu.facility_eva_s:'-'}}</view>
					<view class="text-32  padding-r10">R:</view>
					<view class="text-32 font-gray1 padding-r30" style="border: solid 1upx #0d98ed;">{{danger_listMenu.facility_eva_r?danger_listMenu.facility_eva_r:'-'}}</view>
				</view>
				<view class="border-bottom  align-center">
					<view class="text-36 padding-t30 padding-b30 ">检查内容</view>
					<view class="text-32 font-gray1 padding-r30">{{danger_listMenu.danger_remarks?danger_listMenu.danger_remarks:'-'}}</view>
				</view>
				<view class="border-bottom  align-center" v-show="type==2">
					<view class="text-36 padding-t30 padding-b30">检验要求</view>
					<view class="text-32 font-gray1 padding-r30">{{danger_listMenu.nickname?danger_listMenu.nickname:'-'}}</view>
				</view>

				<view class="border-bottom  align-center" v-show="type==2">
					<view class="text-36 padding-t30 padding-b30 ">潜在事故类型</view>
					<view class="text-32 font-gray1 padding-r30">{{danger_listMenu.danger_accident?danger_listMenu.danger_accident:'-'}}</view>
				</view>

				<view class="border-bottom margin-t30">
					<view class="text-36 padding-t30 padding-b30 border-top">事故原因分析</view>
					<view class="text-32 font-gray1 padding-r30 saytext padding-b30">{{danger_listMenu.reason?danger_listMenu.reason:'暂无原因分析..'}}</view>
				</view>
				<view class="border-bottom margin-t30">
					<view class="text-36 padding-t30 padding-b30 border-top">矫正措施</view>
					<view class="text-32 font-gray1 padding-r30 saytext padding-b30">{{danger_listMenu.change_measures?danger_listMenu.change_measures:'暂无原因分析..'}}</view>
				</view>

				<view class="border-bottom display justify-between align-center">
					<view class="text-36 padding-t30 padding-b30">所属部门</view>
					<view class="text-32 font-gray1 padding-r30">{{danger_listMenu.position_id?danger_listMenu.position_id:'-'}}</view>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				uid: '',
				token: '',
				xunjian_id: '',
				danger_listMenu: {},
				time: '',
				phone: '',
				phone1: '',
				phone2: '',
				zhuangtai: '',
				type: '',

			}
		},
		onLoad: function(options) {
			this.uid = uni.getStorageSync('user').uid;
			this.token = uni.getStorageSync('user').token;
			this.time = options.time
			this.zhuangtai = options.zhuangtai
			this.getXunjian(options.id)
		},
		methods: {
			getXunjian(e) {
				var that = this
				uni.request({
					url: 'https://aqmore.sxpz.vip/AppApi/Safety/detail?uid=' + this.uid + '&token=' + this.token + '&id=' + e,
					method: 'GET',
					header: {
						'content-type': 'application/x-www-form-urlencoded'
					},
					success: function(res) {
						console.log(res)
						that.danger_listMenu = res.data.datas
						console.log(that.danger_listMenu)
						that.phone = that.danger_listMenu.inspection_img
						that.phone1 = that.danger_listMenu.rectify_img
						that.phone2 = that.danger_listMenu.review_img
						that.type = that.danger_listMenu.type
						console.log(that.type)
					}
				})

			}
		}
	}
</script>

<style>
	page {
		margin: 0;
		padding: 0;
		/* background-color: #0d98ed; */
	}

	.jiaobiao {
		color: #007AFF;
	}

	.jiaobiao1 {
		color: #e3e300;
	}

	.jiaobiao2 {
		color: #ff5500;
	}

	.jiaobiao3 {
		color: #ff0000;
	}
</style>
